package com.jt.service;

import com.jt.dao.UserMapper;
import com.jt.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
public class UserServiceImpl implements UserService{
    @Autowired
    private UserMapper mapper;


    @Override
    public void insertOne(User user) {
        mapper.insertOne(user);
    }

    @Override
    public void deleteOne(Integer id) {
        mapper.deleteOne(id);
    }

    @Override
    public void updateOne(String name, Integer id) {
        mapper.updateOne(name,id);
    }

    @Override
    public List<User> selectList() {
        return mapper.selectList();
    }
}
